package com.hanson.mapper;

import com.hanson.entity.CouponsSeqBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CouponsSeqBeanMapper {
    int deleteByPrimaryKey(Integer id);

    int deleteByCouponsId(@Param("couponsId") Integer couponsId);

    int insert(CouponsSeqBean record);

    CouponsSeqBean selectByPrimaryKey(Integer id);

    List<CouponsSeqBean> selectAll();

    List<CouponsSeqBean> selectByUserIdAndCouponsId(@Param("userId") Integer userId, @Param("couponsId") Integer couponsId);

    List<CouponsSeqBean> selectByUserIdAndType(@Param("userId") Integer userId, @Param("type") Integer type);

    Integer countByUserIdAndType(@Param("userId") Integer userId, @Param("type") Integer type);

    int updateByPrimaryKey(CouponsSeqBean record);
}